version: '3.8'

services:
  db:
    image: mysql:8.0
    ports:
      - "3306:3306"
    environment:
      MYSQL_DATABASE: search_engine
      MYSQL_USER: user
      MYSQL_PASSWORD: pass
      MYSQL_ROOT_PASSWORD: pass
    volumes:
      - ./init.sql:/docker-entrypoint-initdb.d/init.sql
      - my-db:/var/lib/mysql
volumes:
  my-db: